class CreateShopCategories < ActiveRecord::Migration[5.2]
  def change
    create_table :shop_categories do |t|
      t.string :name, comment: "分类的名字"
      t.integer :sort, default: 0, comment: "排序,0最先"
      t.integer :parent_id, comment: "父类的id"
      t.boolean :published, default: false, comment: "发布，是否在前端显示"
      t.string :avatar, comment: "分类图标"
      t.integer :level, default: 0, comment: "分类的等级，自动生成"
      t.boolean :clearance, default: false, comment: "促销标志"

      t.timestamps
    end
  end
end
